<?

/*
* Service and prices
*/
$service_name = $reservation->room->service_name;
$service_total = $reservation->room->selling_total;
?>

<div class="content clearfix">

    <form class="form-horizontal" action="<?= lang_url('confirmation') ?>" method="get" id="doreservation">

        <?
        $ST_ID = $reservation->room->selling_type_ID;
        $R_STATUS = $ST_ID == 1 ? WAITNG_AVAILABILITY : WAITNG_PAYMENT;
        $R_30_PERCENT = find_percent(30, $reservation->reservation->price_total);
        ?>

        <input class="hidden" type="text" name="hotel_id" id="hotel_id" value="<?= $_GET['hotel_id'] ?>">
        <input class="hidden" type="text" name="room_id" value="<?= $_GET['room_id'] ?>">
        <input class="hidden" type="text" name="selling_type_ID" value="<?= $ST_ID ?>">
        <input class="hidden" type="text" name="check_in" value="<?= $_GET['check_in'] ?>">
        <input class="hidden" type="text" name="check_out" value="<?= $_GET['check_out'] ?>">
        <input class="hidden" type="text" name="nr_adults" value="<?= $_GET['nr_adults'] ?>">
        <input class="hidden" type="text" name="nr_childrens" value="<?= $_GET['nr_childrens'] ?>">
        <input class="hidden" type="text" name="nr_babies" value="<?= $_GET['nr_babies'] ?>">
        <input class="hidden" type="text" name="reservation_status" value="<?= $R_STATUS ?>">


        <div class="box section fix">
            <div class="title header"><?= lang('guest_and_reservation_data') ?></div>


            <div id="summary" class="secp clearfixcont">

                <ul>
                    <li><?= lang('selected_facility') ?>: <span><?= $reservation->object_name ?></span></li>
                    <li><?= lang('c.location'); ?>: <span><?= $reservation->destination_name ?></span></li>
                    <li><?= lang('unit') ?>:
                        <span><?= $reservation->room->name ?><? if ($reservation->room->description != "") echo $reservation->room->description; ?>
                            , <?= $reservation->room->service_name ?></span></li>

                </ul>

            </div>
            <!-- /summary-->

            <div id="passenger" class="secp clearfix block">

                <h4><?= lang('c.info_reservation_holder'); ?></h4>

                <div class="centered">

                    <div class="half ">

                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('gender'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <select placeholder="<?= lang('gender'); ?>" name="sex" id="sex" required>
                                    <option value=""><?= lang('gender'); ?></option>
                                    <option value="M"><?= lang('male'); ?></option>
                                    <option value="Z"><?= lang('female'); ?></option>
                                </select>
                            </div>

                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('name'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('name'); ?>" name="name" id="name" required  value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('date_of_birth'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('date_of_birth'); ?>" name="birth_date" id="birth_date" required value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label label_checkout_<?= $this->lang->mci_current() ?>"
                                   for="service"><?= lang('mobile_phone'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('mobile_phone'); ?>" name="phone" id="phone" required value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('city'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('city'); ?>" name="city" id="city" required value="">
                            </div>
                        </div>
                    </div>

                    <div class="half ">
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('email'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <input type="email" placeholder="<?= lang('email'); ?>" name="email" id="email" required value="">


                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('surname'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('surname'); ?>" name="surname" id="surname" required value="">



                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('address'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('address'); ?>" name="address" id="address" required value="">


                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('zip_code'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('zip_code'); ?>" name="zip" id="zip" required  value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('country'); ?>:<span class="red">*</span></label>

                            <div class="controls">
                                <select placeholder="<?= lang('country'); ?>" name="country" id="country" required>
                                    <option value=""><?= lang('country'); ?></option>
                                    <?
                                    foreach (config_item('country_list') as $key => $country)
                                    if ($country == 'Montenegro')
                                    echo "<option value='{$country}'>{$country}</option>";
                                    else
                                    echo "<option value='{$country}'>{$country}</option>";

                                    ?>
                                </select>
                            </div>
                        </div>

                    </div>

                    <div style="clear: both"></div>

                    <div class="control-group last">
                        <label class="control-label" for="service"><?= lang('note') ?>:</label>

                        <div class="controls">
                            <textarea name="notice" id="notice"></textarea>
                        </div>
                    </div>

                </div>

            </div>
            <!-- /passenger-->

            <div id="payment_method" class="secp clearfix">

                <div class="half pull-left">

                    <h4><?= lang('c.methods_of_payment'); ?></h4>

                    <div class="inner_prices">

                        <ul>
                            <li class="clearfix">
                                <input type="radio" name="payment_method" value="Credit card online"
                                       checked="checked"><?= lang('c.cc_online'); ?>
                            </li>
                            <li class="clearfix">
                                <input type="radio" name="payment_method"
                                       value="Credit card using offline authorization"><?= lang('c.cc_offline'); ?>
                            </li>
                            <li class="clearfix">
                                <input type="radio" name="payment_method"
                                       value="Bank transfer in EUR"><?= lang('c.bank_trasfer'); ?>
                            </li>
                            <li class="clearfix">
                                <input type="radio" name="payment_method" value="Western Union"><?= lang('c.wu'); ?>
                            </li>

                        </ul>
                    </div>
                </div>

                <div class="half pull-left">

                    <h4><?= lang('foot.payment'); ?></h4>

                    <div class="inner_prices" style="padding-right: 0">

                        <ul>
                            <li class="clearfix">
                                <input type="radio" name="payment_options" value="Payment in full" checked="chcked"><?= lang('c.payment_in_full'); ?>
                            </li>
                            <li class="clearfix">
                                <input type="radio" name="payment_options" value="30% now and 70% balance 10 days before arrival"><?= lang('c.30_70_10'); ?>
                            </li>
                            <? if ($reservation->object_type_type != 'hotel'): ?>
                            <li class="clearfix">
                                <input type="radio" name="payment_options" value="30% now and 70% balance upon arrival"><?= lang('c.30_70'); ?>
                            </li>
                            <? endif; ?>

                        </ul>
                    </div>
                </div>

            </div>
            <!-- /payment_method-->

        </div>

        <div class="box section">
            <div class="title header"><?= lang('price_calculation') ?></div>

            <p class="info_checkout"><?= lang('fill_out_form') ?></p>

            <div id="intro" class="secp">
                <div class="title"><?= $reservation->object_name ?></div>

                <div class="clearfix reservation_info">
                    <div class="half">
                        <div class="col">
                            <span><?= lang('form.checkin'); ?>:</span>
                            <span><?= $_GET['check_in'] ?></span>
                        </div>
                        <div class="col">
                            <span><?= lang('form.checkout'); ?>:</span>
                            <span><?= $_GET['check_out'] ?></span>
                        </div>
                    </div>
                    <div class="half">
                        <div class="col">
                            <span><?= lang('no_nights') ?>:</span>
                            <span><?= calculateDays($_GET['check_in'], $_GET['check_out'], TRUE) ?></span>
                        </div>
                        <div class="col">
                            <span><?= lang('dtl.num_of_persons') ?>:</span>
                            <span><?= $_GET['nr_adults'] + $_GET['nr_childrens'] ?></span>
                        </div>

                    </div>

                </div>

            </div>

            <div id="calculation" class="secp clearfix calculation">

                <div class="col clearfix">
                    <span><?= lang('res.service') ?>:</span>
                    <span><?= lang('amount') ?></span>
                </div>
                <div class="col clearfix">
                    <span><?= $service_name ?>:</span>
                    <span><?= $service_total ?> €</span>
                </div>
                <div class="col clearfix last">
                    <span><?= lang('total'); ?>:</span>
                    <span><?= $service_total ?> €</span>
                </div>
                <div class="col clearfix last advance_payment" style="display: none">
                    <span><?= lang('advance_payment'); ?>:</span>
                    <span><?= $R_30_PERCENT ?> €</span>
                </div>

            </div>

            <div class="tax secp"><?= lang('dtl.tax_included'); ?></div>

            <div class="reservation secp">
                <h4><?= lang('make_reservation') ?></h4>

                <input type="checkbox" id="agree" name="agree" checked="checked">
                <?= lang('c.i_have_read'); ?>
                <a href="<?= lang_url('globtourmontenengro/general_terms_and_conditions-47') ?>"><?= lang('c.general_terms'); ?>
                    <? if ($this->lang->mci_current() != 'me') echo '&'; ?>
                    <?= lang('c.conditions'); ?></a>
                <span class="emp"><span class="red">*</span></span>

            </div>

            <div class="secp">
                <p>
                    <?= lang('third_party') ?>
                </p>
            </div>

            <div class="section submit">
                <input type="submit" class="button green" value="<?= lang('t.make_inquiry') ?>">
            </div>


        </div>
</div>

</div>

</div>